package cn.lutu.dao.mapper;

import cn.lutu.protocol.dto.AdminSelectUserDTO;
import cn.lutu.protocol.dto.AuthorityUpdateDTO;
import cn.lutu.protocol.entity.Authority;
import cn.lutu.protocol.entity.Category;
import cn.lutu.protocol.entity.UserAndRole;
import cn.lutu.protocol.vo.RoleVO;
import cn.lutu.protocol.vo.adminVO.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import javax.management.relation.Role;
import java.util.List;

@Repository
public interface AdminMapper extends BaseMapper<UserAndRole> {

    List<AdminUserListVO> selectAdminUserList();

    List<AdminRoleListVO> selectRoleList();

    List<AdminSpotVO> selectSpot();

    List<AdminUserListVO> userListBy(AdminSelectUserDTO adminSelectUserDTO);

    UserDetailVO getUserInfoByUsername(String userName);

    RoleVO getRoleInfoName(String name);

    AuthorityUpdateVO getAuthorityInfo(Long id);

    AdminSpotVO getSpotById(Long id);

    RoleUpdateInfoVO getUpdateById(Long id);

    List<AuthorityUpdateVO> selectAuthority();

    int updateAuthority(Authority authority);

    int deleteAuthorityById(Long id);

    AuthorityUpdateVO getAuthorityInName(String name);

}
